package com.design.yjx.strategy;

/**
 * @author yuanjianxin
 * @date 2017/8/2 11:33
 * 绿头鸭，会游泳，可以飞行，呱呱叫
 */
public class MallardDuck extends Duck {

    public MallardDuck() {
        setFlyBehavior(new FlyWithWings());
        setQuackBehavior(new Quack());
    }

    public void display() {
        System.out.println("我是绿头鸭，我的头顶一抹绿！-_- ");
    }
}
